Page({
    /*-------------------初始化数据-------------------------*/
  data: {
    name: "CoerwhyAAAA",
    age: 18,
    students: [
      { id: 110, name: "wang", age: 18 },
      { id: 111, name: "li", age: 28 },
      { id: 112, name: "ma", age: 38 },
      { id: 113, name: "zhang", age: 48}
    ],
    message: '',
    count: 0
  },

    /*-------------------页面处理函数-------------------------*/
  handleBtnClick(){
    this.setData({
      count: this.data.count+1
    })
  },
  handleSubtraction(){
    this.setData({
      count: this.data.count-1
    })
  },
  handleGetUserInfo(event){
    console.log(event)
  },



  /*-------------------生命周期函数-------------------------*/ 
  // 页面加载时
  onLoad(){
    console.log('onLoad')
    wx.request({
      url: 'http://123.207.32.32:8000/recommend',
      success:(res) => {
        // console.log(res)
        this.setData({
          message: 'heiheihei'
        })
      }
    })
  },
  // 页面初次显示
  onReady(){
    console.log('onReady')
  },
  // 页面显示时
  onShow(){
    console.log('onShow')
  },
  // 页面关闭时
  onHide(){
    console.log('onHide')
  },
  onUnload(){
    console.log('onUnload')
  },

/*-------------------其他处理函数-------------------------*/
// 监听页面滚动坐标
onPageScroll(obj){
  // console.log(obj)
},
// 监听页面滚动到底部
onReachBottom(){
  // console.log('我被滚动到底部了')
},
// 监听下拉刷新
onPullDownRefresh(){
  console.log('下拉刷新了')
}
})